export class CustomError extends Error {
  public code: number

  public msg: string

  public data: any

  public message: string

  constructor(code: number, msg: string, data: any) {
    super()
    this.code = code
    this.msg = msg
    this.data = data || null
    this.message = `${this.code} - ${this.msg}`
  }
}
